<?php
/**
 * Created by PhpStorm.
 * User: Mio
 * Date: 2017/10/11
 * Time: 16:56
 */

namespace app\index\model;

use think\Model;

class Config extends Model
{
    protected $tableName = 'config';

    /**
     * 读取某个配置项
     *
     * @param string $name 配置项参数英文名称
     * @return mixed 成功返回配置项值，否则返回false
     * @author zhengzhen
     * @todo 获取表tp_config中config_name为$name的值config_value
     *
     */
    public function getConfig($name)
    {
        return $this->where('config_name= "' . $name . '"')->value('config_value');
    }

}